export class BlogBean {
    constructor(title: string, text: string, data: string, image: [], author: string) {
        this.title = title
        this.text = text
        this.data = data
        this.image = image
        this.author = author
    }

}

export function matchBlog(blogItem: BlogBean[], search: string): BlogBean[] {
    return blogItem.filter(item => item.title.includes(search) || item.text.includes(search) || item.data.includes(search))
}